<template>
  <child-blue v-if="type === 1"></child-blue>
  <child-red v-if="type === 0"></child-red>
  <div>{{ type }}</div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import childBlue from './component/childBlue.vue';
import childRed from './component/childRed.vue';

const type = ref(Math.random() > 0.5 ? 1 : 0);
console.log('type :>> ', type);
</script>

<style scoped lang="less"></style>
